//
//  HSSelectView.h
//  Wutuojia
//
//  Created by Work on 15/7/19.
//  Copyright (c) 2015年 Work. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HSAccessoryView.h"

typedef enum {
    OcnSelectTypeNormal = 1000,
    OcnSelectTypeDate = 1001,
}OcnSelectType;

typedef void (^selEndDateBlock)(id sender);
typedef void (^selEndDateBlock2)(id sender,NSInteger index);
typedef void (^reloadDateBlock)(id sender);
@interface HSSelectView : UIView<
ALAccessoryViewDelegate,
UIPickerViewDataSource,
UIPickerViewDelegate>{
}

@property (nonatomic, assign) BOOL enabled;
@property (nonatomic, assign) OcnSelectType selectType;
@property (nonatomic,retain)UIFont *selectedFont;
@property (nonatomic,copy) NSString *title;
//type normal
@property (nonatomic, retain) NSArray *options;     //select items.
@property (nonatomic, copy) NSString *value;        //result.
@property (nonatomic, assign) NSInteger index;        //index.
//type date
@property (nonatomic, retain) NSDate *dateValue;    //result.
@property (nonatomic, retain) NSDate *minDate;      //enabled min date range.
@property (nonatomic, retain) NSDate *maxDate;      //enabled max date range.

@property (nonatomic) UIDatePickerMode datePickerMode;

-(void)setTitleEdgeInsets:(UIEdgeInsets)insets;     //设置偏移量
-(void)setAlignment:(UIControlContentHorizontalAlignment)alignment; //设置对齐方式

- (void)setSelectedDate:(NSDate *)selectedDate;     //set default display date.

- (void)addTarget:(id)target forVauleChangedaction:(SEL)action;

- (void)showPickerView;

- (id)initWithFrame:(CGRect)frame font:(UIFont*)font;
-(void)changeFont:(UIFont *)font;


-(id)initWithFrame:(CGRect)frame img:(UIImage *)img;            //设置图片

@property (nonatomic,copy) selEndDateBlock endDateBack;
@property (nonatomic,copy) selEndDateBlock2 endDateBack2;
@property (nonatomic,copy) reloadDateBlock theReloadDateBlock;
@end
